<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/admin.css'); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/main.css'); ?>">
<script type='text/javascript' src="<?php echo $this->_webroot('skin/js/jy.js'); ?>"></script>
<style>
td span {color:red;}
.green {color:green;}
.red {color:red;}
#divname{float:left; margin:0px;}
</style>
</head>
<body>
<input type="hidden" id="update_right" value="1" ></input>
<div id="maincontent">
	<div class="wrap">
    <div class="crumbs">当前位置 &gt;&gt; 交易管理&gt;&gt;订单查看</div>
        <hr />

		<div class="infobox">
			<h3><span class="left">订单查看</span><span class="right" style="margin-right:15px;"><a href="<?php echo $this->_url('admin/order/index/?');?>" style="float: right;">返回订单列表</a></span></h3>
			<div class="content2"> 
			<span style="text-align:center;" align="middle">
				<?php if($info['order_status']==1 && $info['pay_status']==0){?>
				<a class="btn_ava"  onclick="window.location='<?php echo $this->_url('admin/order/orderview/?');?>order_id=<?php echo $info['id'];?>&state=1'"><span>取消订单</span></a>
				<?php }else{?>
				<a class="btn_unava"><span>取消订单</span></a>
				<?php }?>
				<?php if($info['pay_status']==0 && ($info['order_status']==1 || $info['order_status']==2)){?>
				<a class="btn_ava"  onclick="window.location='<?php echo $this->_url('admin/order/orderview/?');?>order_id=<?php echo $info['id'];?>&state=2'"><span>付&nbsp;&nbsp;款</span></a>
				<?php }else{?>
				<a class="btn_unava"><span>付款</span></a>
				<?php }?>
				<?php if($info['transport_status']==0 && $info['order_status']==2){?>
				<a class="btn_ava"  onclick="window.location='<?php echo $this->_url('admin/order/orderview/?');?>order_id=<?php echo $info['id'];?>&state=3'"><span>商家发货</span></a>
				<?php }else{?>
				<a class="btn_unava"><span>商家发货</span></a>
				<?php }?>
				<?php if($info['transport_status']==1 && $info['pay_status']==1 && ($info['order_status']==1 || $info['order_status']==2)){?>
				<a class="btn_ava"  onclick="window.location='<?php echo $this->_url('admin/order/orderview/?');?>order_id=<?php echo $info['id'];?>&state=4'"><span>确认收货</span></a>
				<?php }else{?>
				<a class="btn_unava"><span>确认收货</span></a>
				<?php }?>
				</span>
				
				
		<form action="a.php?act=order_payment_edit" method="post" onsubmit="return checkform();" enctype="multipart/form-data">
		<table class="list_table">
			<thead>
			<tr>
				<th colspan="4">&nbsp;&nbsp;商品信息</th>
			</tr>
			</thead>
			<tbody>
                <tr style="text-align:center;">
                	<td width="270px" align="left">&nbsp;&nbsp;商品名称</td>
                    <td width="100px">商品价格</td>
                    <td width="80px">购买数量</td>
                    <td width="" align="left">运费</td>
                </tr>
                <?php
                	foreach ($info['order_goods'] as $k=>$v){
                ?>
				<tr style="text-align:center;">
					<td align="left">&nbsp;&nbsp;<?php echo $v['ordergoods']['goods_name'];?></a></td>
					<td><?php echo $v['ordergoods']['goods_price'];?>元</td>
					<td><?php echo $v['ordergoods']['order_num'];?></td>
					<td align="left"><?php echo $info['ordergoods']['good_tran'];?>元</td>
				</tr>
				<?php
                	}
				?>
				<tr><td align="left" colspan="4">&nbsp;&nbsp;实付款：<?php echo $info['order_amount'];?></span>元&nbsp;&nbsp;应付款：<?php echo $info['order_value'];?>元</td></tr>
			</tbody>
		</table>
		<table class="list_table">
			<thead>
				<tr>
					<th colspan="2">&nbsp;&nbsp; 管理中心</th>
				</tr>
			</thead>
			<tbody>
				<tr><td width="80px">&nbsp;&nbsp;联系人：</td><td><?php echo $info['consignee'];?></td></tr>
				<tr><td>&nbsp;&nbsp;手　机：</td><td><?php echo $info['mobile'];?></td></tr>
				<tr><td>&nbsp;&nbsp;电　话：</td><td><?php echo $info['telphone'];?></td></tr>
				<tr><td>&nbsp;&nbsp;邮　箱：</td><td><?php echo $info['email'];?></td></tr>
				<tr><td>&nbsp;&nbsp;所在地区：</td><td><?php echo $areas[$info['province']];?> <?php echo $areas[$info['city']];?> <?php echo $areas[$info['district']];?></td></tr>
				<tr><td>&nbsp;&nbsp;详细地址：</td><td><?php echo $info['address'];?></td></tr>
				<tr><td>&nbsp;&nbsp;邮政编码：</td><td><?php echo $info['zipcode'];?></td></tr>
			</tbody>
		</table>
		<table class="list_table">
			<thead>
				<tr>
					<th colspan="2">&nbsp;&nbsp;发货信息</th>
				</tr>
			</thead>
			<tbody>
				<tr><td width="100">&nbsp;&nbsp;商家名称：</td><td><?php echo $info['shop_name'];?></td></tr>
				<tr><td>&nbsp;&nbsp;物流公司名称：</td><td><?php echo $info['shipping_name'];?></td></tr>
				<tr><td>&nbsp;&nbsp;物流发货单号：</td><td><?php echo $info['shipping_no'];?></td></tr>
				<tr><td>&nbsp;&nbsp;发货运输类型：</td><td><?php echo $info['shipping_type'];?></td></tr>
				<tr><td>&nbsp;&nbsp;发货时间：</td><td><?php echo $info['shipping_time'];?></td></tr>
			</tbody>
		</table>
		<table class="list_table">
			<thead>
				<tr>
					<th colspan="2">&nbsp;&nbsp;订单信息</th>
				</tr>
			</thead>
			<tbody>
				<tr><td width="100">&nbsp;&nbsp;订单ID：</td><td><?php echo $info['payid'];?></td></tr>
				<tr><td>&nbsp;&nbsp;商家收款方式：</td><td><?php echo $info['pay_name'];?></td></tr>
				
				<tr><td>&nbsp;&nbsp;订单附言：</td><td><?php echo $info['message'];?></td></tr>
				<tr><td>&nbsp;&nbsp;下订单时间：</td><td><?php echo $info['order_time'];?></td></tr>
				<tr><td>&nbsp;&nbsp;支付时间：</td><td><?php echo $info['pay_time'];?></td></tr>
				<tr><td>&nbsp;&nbsp;收货时间：</td><td><?php echo $info['receive_time'];?></td></tr>
			</tbody>
		</table>
		</form>
				
				
			</div>
		</div>		
		
	</div>
</div>
</body>
</html>